package mx.com.asteca.persistencia.entidades;
// Generated 31/07/2013 11:41:38 AM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Institutos generated by hbm2java
 */
@Entity
@Table(name="institutos"
    ,catalog="astecadb"
)
public class Institutos  implements java.io.Serializable {


     private int idInstituto;
     private String nombre;
     private String razonSocial;
     private String rfc;
     private Domicilios domicilios;
     private String fax;
     private Set<InstitutoContactos> institutoContactoses = new HashSet<InstitutoContactos>(0);

    public Institutos() {
    }

	
    public Institutos(int idInstituto) {
        this.idInstituto = idInstituto;
    }
    public Institutos(int idInstituto, String nombre, String razonSocial, String rfc,  Domicilios domicilios, String fax, Set<InstitutoContactos> institutoContactoses) {
       this.idInstituto = idInstituto;
       this.nombre = nombre;
       this.razonSocial = razonSocial;
       this.rfc = rfc;
       this.domicilios = domicilios;
       this.fax = fax;
       this.institutoContactoses = institutoContactoses;
    }
   
     @Id 
     @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name="ID_INSTITUTO", unique=true, nullable=false)
    public int getIdInstituto() {
        return this.idInstituto;
    }
    
    public void setIdInstituto(int idInstituto) {
        this.idInstituto = idInstituto;
    }
    
    @Column(name="NOMBRE", length=50)
    public String getNombre() {
        return this.nombre;
    }
    
    public void setNombre(String nombre) {
        this.nombre = nombre;
    }
    
    @Column(name="RAZON_SOCIAL", length=50)
    public String getRazonSocial() {
        return this.razonSocial;
    }
    
    public void setRazonSocial(String razonSocial) {
        this.razonSocial = razonSocial;
    }
    
    @Column(name="RFC", length=20)
    public String getRfc() {
        return this.rfc;
    }
    
    public void setRfc(String rfc) {
        this.rfc = rfc;
    }
    
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_DOMICILIO")
    public Domicilios getDomicilios() {
        return this.domicilios;
    }
    
    public void setDomicilios(Domicilios domicilios) {
        this.domicilios = domicilios;
    }
    
    @Column(name="FAX", length=20)
    public String getFax() {
        return this.fax;
    }
    
    public void setFax(String fax) {
        this.fax = fax;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="institutos")
    public Set<InstitutoContactos> getInstitutoContactoses() {
        return this.institutoContactoses;
    }
    
    public void setInstitutoContactoses(Set<InstitutoContactos> institutoContactoses) {
        this.institutoContactoses = institutoContactoses;
    }




}


